package trainingcamp.day01;
import java.util.Scanner;

public class 商品打折计算 {
    public static void main(String[] args) {
        System.out.println("请输入商品的价格:");
        Scanner scanner = new Scanner(System.in);
        double price =  (double)scanner.nextDouble();
        if(price>500){
            price = price*0.8;
        }else if(0<price && price<=500) {
            price = price*0.95;
        }
        System.out.println(price);
    }
}
